<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      @keyframes rotate {
        100% {
          /* transform: rotateZ(180deg); */
          /* transform: rotate3d(X, Y, Z, deg); */
          transform: rotate3d(0, 1, 0, 180deg);
        }
      }
      body {
        perspective: 500px;
      }
      div {
        width: 200px;
        height: 200px;
        background-color: skyblue;
        margin: 200px auto;
      }
      div:hover {
        animation: rotate 1s linear infinite;
      }
    </style>
  </head>
  <body>
    <div></div>
  </body>
</html>
